// 请求后台数据   使用接口函数
import request from '@/utils/request'

/** 
*获取所有顶级分类目
*@returns Promise
*/
export const findCategory = () => {
    return request('/home/category/head','get')
}
// 获取筛选数据
export const findFliter = (id) => {
    return request('/category/sub/filter', 'get', { id })
}
// 获取分类数据
// export const findSubCategoryGoods = (params) => {
//     return request('/category/goods/temporary','post',params)
// }
/**
 * 获取分类下的商品（带筛选条件）
 * @param {Object} params - 可参考接口文档
 */
export const findSubCategoryGoods = (params) => {
    return request('/category/goods/temporary', 'post', params)
  }

  
//   https://apipc-xiaotuxian-front.itheima.net/category/goods/temporary